package dao;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public abstract class DAOFactory {

    private static Log log = LogFactory.getLog(DAOFactory.class);

    /**
     * Creates a standalone DAOFactory that returns unmanaged DAO
     * beans for use in any environment Hibernate has been configured
     * for. Uses HibernateUtil/SessionFactory and Hibernate context
     * propagation (CurrentSessionContext), thread-bound or transaction-bound,
     * and transaction scoped.
     */
    @SuppressWarnings("unchecked")
	public static final Class HIBERNATE = dao.hibernate.HibernateDAOFactory.class;

    /**
     * Factory method for instantiation of concrete factories.
     */
    @SuppressWarnings("unchecked")
	public static DAOFactory instance(Class factory) {
        try {
            log.debug("Creating concrete DAO factory: " + factory);
            return (DAOFactory)factory.newInstance();
        } catch (Exception ex) {
            throw new RuntimeException("Couldn't create DAOFactory: " + factory);
        }
    }

    // Add your DAO interfaces here
	public abstract NhomNguoiDungDAO getNhomNguoiDungDAO();
	public abstract NguoiDungDAO getNguoiDungDAO();
	public abstract BaiVietDAO getBaiVietDAO();
	public abstract CauHoiTrucTuyenDAO getCauHoiTrucTuyenDAO();
	public abstract ChuDeDAO getChuDeDAO();
	public abstract ChuyenKhoaDAO getChuyenKhoaDAO();
	public abstract LoaiBenhDAO getLoaiBenhDAO();
	public abstract LoaiThuocDAO getLoaiThuocDAO();
	public abstract YKienBanDocDAO getYKienBanDocDAO();
	public abstract BenhDAO getBenhDAO();
	public abstract ThuocDAO getThuocDAO();
	public abstract DiaDiemYTeDAO getDiaDiemYTeDAO();
	public abstract BacSiDAO getBacSiDAO();
	public abstract ThietBiYTeDAO getThietBiYTeDAO();
	public abstract ChuDeKhacDAO getChuDeKhacDAO();
	public abstract ThongTinDBDAO getThongTinDBDAO();
	public abstract LoaiDiaDiemYTeDAO getLoaiDiaDiemYTeDAO();
	public abstract LoaiThietBiYTeDAO getLoaiThietBiYTeDAO();
}
